Pharmacists routinely dispense solid medications following doctor's prescription. Most often they count the pills manually with the aid of a counting tray.
In recent years various devices have come to the market intended to automate the counting process and ensure accuracy of the count. Unfortunately all of them either require human involvement in counting, are not accurate or safe enough, or cannot handle certain shapes or colors of the pills effectively.